package com.bwie.controller;

import com.bwie.service.UserService;
import com.bwie.utils.R;
import com.bwie.vo.UserVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author lenovo
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;

    @PostMapping("/sendCode/{mobile}")
    public R sendCode(@PathVariable String mobile){
        return userService.sendCode(mobile);
    }

    @PostMapping("/login")
    public R login(@RequestBody UserVo userVo){
        return userService.login(userVo);
    }


}
